package com.zshan.clinic.admin.entity.vo.print.rx;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.zshan.clinic.admin.entity.medical.rx.RxDrug;
import com.zshan.clinic.admin.entity.medical.rx.RxInfusion;
import com.zshan.clinic.admin.entity.medical.rx.RxTcm;
import com.zshan.clinic.admin.entity.vo.print.rx.ext.RxExtPrint;
import lombok.Data;

@Data
@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,  // 使用字段名称来标识
        property = "rxType",  // 使用 rxType 字段来决定子类类型
        visible = true
)
@JsonSubTypes({
        @JsonSubTypes.Type(value = RxDrug.class, name = "1"),
        @JsonSubTypes.Type(value = RxInfusion.class, name = "2"),
        @JsonSubTypes.Type(value = RxTcm.class, name = "3"),
        @JsonSubTypes.Type(value = RxExtPrint.class, name = "4"),
})
public class RxPrintBase {


    /**
     * 处方类型
     */
    private String rxType;

    /**
     * 处方名
     */
    private String rxName;
}
